#include "contentwidget.h"
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QDebug>
#include <QMessageBox>

contentwidget::contentwidget(QWidget *parent) : QWidget(parent)
{
    initControl();
    setLayoutWidget();
}

contentwidget::~contentwidget()
{

}

void contentwidget::initControl()
{
    m_stackwidget = new QStackedWidget(this);
    m_infowidget = new infowidget(this);
    m_resultwidget = new resultwidget(this);
    m_dragwidget = new dragwidget(this);
    m_multilinewidget = new multilinewidget(this);
    m_stackwidget->addWidget(m_infowidget);
    m_stackwidget->addWidget(m_resultwidget);
    m_stackwidget->addWidget(m_dragwidget);
    m_stackwidget->addWidget(m_multilinewidget);
}

void contentwidget::setLayoutWidget()
{
    QVBoxLayout *mainlayout = new QVBoxLayout;
    mainlayout->setContentsMargins(10,10,10,10);
    mainlayout->setSpacing(0);
    mainlayout->addWidget(m_stackwidget);
    this->setLayout(mainlayout);
}

void contentwidget::resizeEvent(QResizeEvent *event)
{
    QWidget::resizeEvent(event);
}

void contentwidget::paintEvent(QPaintEvent *event)
{
    QWidget::paintEvent(event);
}




















